package com.xuchaotong.utils;

public class Example {
    private int i = 2;

    public void test(){
        int i = 10;
        System.out.println(i);
    }

    public static void main(String[] args) {
        Example example = new Example();
//        example.test();
//        System.out.println(example.i);
//        String s;
//        System.out.println("s=" + s);
        int val = example.getValue(2);
        System.out.println("val = " + val);
    }

    public int getValue(int i){
        int result = 0;
        switch (i){
            case 1:
                result = result + i * 1;
            case 2:
                result = result + i * 2;
            case 3:
                result = result + i * 3;
        }
        return result;
    }
}
